* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background-image: url('https://img.freepik.com/free-photo/stack-books-library-room-blurred-background_1150-5920.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    display: flex;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.3);
}

.left-side {
    flex: 1.2;
}

.right-side {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 5%;
}

.login-box {
    width: 380px;
    padding: 40px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    transition: 0.3s;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    pointer-events: none;
    transition: 0.3s;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 14px;
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 5px;
}

.input-group input:focus {
    border-bottom: 2px solid #4CAF50;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

button {
    width: 100%;
    padding: 12px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

button:hover {
    background: rgba(69, 160, 73, 1);
    transform: translateY(-1px);
}

.register-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        flex: 1;
        padding-right: 0;
    }
    
    .login-box {
        width: 100%;
        max-width: 400px;
    }
}

/* 注册页面的输入框组样式调整 */
.login-box form .input-group:not(:last-child) {
    margin-bottom: 25px;
}

/* 密码输入框的特殊样式 */
.input-group input[type="password"] {
    letter-spacing: 0.1em;
}

/* 注册按钮悬停效果增强 */
.login-box form button:hover {
    background: rgba(69, 160, 73, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* 错误提示样式 */
.input-group .error-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 12px;
    color: #ff4444;
    display: none;
}

.input-group input:invalid:focus ~ .error-message {
    display: block;
}

/* 注册页面居中样式 */
.register-center {
    flex: 1 !important;
    padding-right: 0 !important;
    justify-content: center !important;
    display: flex;
    align-items: center;
}
.show-info {
    float: left;
    flex: 0 0 30%; /* 不伸缩，基础宽度30% */
    width: 30%;
    padding: 20px;
}
.logout-link {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}
.welcome-message {
    font-size: 24px;
    color: #4CAF50;
    margin: 20px 0;
}


/* 调整注册页面的输入框间距 */
.register-center .input-group {
    margin-bottom: 20px;
}

/* 注册页面的表单框稍微加宽 */
.register-center .login-box {
    width: 420px;
}

/* 年级和班级输入框的特殊样式 */
.input-group input[type="text"] {
    outline: none;
}

/* 移除左侧区域 */
.register-center + .left-side {
    display: none;
}

/* 调整移动端样式 */
@media (max-width: 768px) {
    .register-center .login-box {
        width: 100%;
        max-width: 420px;
    }
}
/*导航栏*/
